function EventsUtil(){
	"use strict";
}

// Crossbrowser get event 
// source http://www.quirksmode.org/js/events_properties.html
EventsUtil.getEvent = function (e) {
	"use strict";
	var event = e;
	if (!event) {
		event = window.event;
	}
	return event;
};

// Crossbrowser is right button pressed
// source http://www.quirksmode.org/js/events_properties.html
EventsUtil.isRightButtonPressed = function (e) {
	"use strict";
	var event = EventsUtil.getEvent(e);
	var rightclick;
	if (event.which) { 
		rightclick = (event.which === 3);
	} else if (event.button) { 
		rightclick = (event.button === 2);
	}
	return rightclick;
};

// Crossbrowser is left button pressed
// source http://www.quirksmode.org/js/events_properties.html
EventsUtil.isLeftButtonPressed = function (e) {
	"use strict";
	var event = EventsUtil.getEvent(e);
	var leftclick;
	if (event.which) { 
		leftclick = (event.which === 1);
	} else if (event.button) { 
		leftclick = (event.button === 1);
	}
	return leftclick;
};


// Crossbrowser get keycode 
// source http://www.quirksmode.org/js/events_properties.html
EventsUtil.getKeyboardKeyCode = function (e) {
	"use strict";
	var event, code;
	event = EventsUtil.getEvent(e);
	if (event.keyCode) {
		code = event.keyCode;
	} else if (event.which) {
		code = event.which;
	}
	return code;
};

